The HyperText Markup Language or HTML is the standard
markup language
Markup language refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
for documents designed to be displayed in a
web browser
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
. It can be assisted by technologies such as
Cascading Style Sheets
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
(CSS) and
scripting language
A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled.
A scripting ...
s such as
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
.
Web browser
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
s receive HTML documents from a
web server
A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiate ...
or from local storage and
render the documents into multimedia web pages. HTML describes the structure of a
web page semantically
Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy, linguistics and comput ...
and originally included cues for the appearance of the document.
HTML element
An HTML element is a type of HTML (HyperText Markup Language) document component, one of several types of HTML nodes (there are also text nodes, comment nodes and others). The first used version of HTML was written by Tim Berners-Lee in 1993 ...
s are the building blocks of HTML pages. With HTML constructs,
images
An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
and other objects such as
interactive forms may be embedded into the rendered page. HTML provides a means to create
structured document
A structured document is an electronic document where some method of markup is used to identify the whole and parts of the document as having various meanings beyond their formatting. For example, a structured document might identify a certain por ...
s by denoting structural
semantics
Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy
Philosophy (f ...
for text such as headings, paragraphs, lists,
links, quotes, and other items. HTML elements are delineated by ''tags'', written using
angle brackets
A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a 'left' or 'r ...
. Tags such as and directly introduce content into the page. Other tags such as surround and provide information about document text and may include other tags as sub-elements. Browsers do not display the HTML tags but use them to interpret the content of the page.
HTML can embed programs written in a
scripting language
A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled.
A scripting ...
such as
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
, which affects the behavior and content of web pages. The inclusion of CSS defines the look and layout of content. The
World Wide Web Consortium
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
(W3C), former maintainer of the HTML and current maintainer of the CSS standards, has encouraged the use of CSS over explicit presentational HTML
A form of HTML, known as
HTML5
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
, is used to display video and audio, primarily using the element, in collaboration with javascript.
History
Development
In 1980,
physicist
A physicist is a scientist who specializes in the field of physics, which encompasses the interactions of matter and energy at all length and time scales in the physical universe.
Physicists generally are interested in the root or ultimate caus ...
Tim Berners-Lee
Sir Timothy John Berners-Lee (born 8 June 1955), also known as TimBL, is an English computer scientist best known as the inventor of the World Wide Web. He is a Professorial Fellow of Computer Science at the University of Oxford and a profess ...
, a contractor at
CERN
The European Organization for Nuclear Research, known as CERN (; ; ), is an intergovernmental organization that operates the largest particle physics laboratory in the world. Established in 1954, it is based in a northwestern suburb of Gene ...
, proposed and prototyped
ENQUIRE
ENQUIRE was a software project written in 1980 by Tim Berners-Lee at CERN, which was the predecessor to the World Wide Web. It was a simple hypertext program that had some of the same ideas as the Web and the Semantic Web but was different in ...
, a system for CERN researchers to use and share documents. In 1989, Berners-Lee wrote a memo proposing an
Internet
The Internet (or internet) is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a '' network of networks'' that consists of private, pub ...
-based
hypertext
Hypertext is E-text, text displayed on a computer display or other electronic devices with references (hyperlinks) to other text that the reader can immediately access. Hypertext documents are interconnected by hyperlinks, which are typi ...
system. Berners-Lee specified HTML and wrote the browser and server software in late 1990. That year, Berners-Lee and CERN
data systems Data system is a term used to refer to an organized collection of symbols and processes that may be used to operate on such symbols. Any organised collection of symbols and symbol-manipulating operations can be considered a data system. Hence, huma ...
engineer
Robert Cailliau
Robert Cailliau (, born 26 January 1947) is a Belgian informatics engineer, computer scientist and author who proposed the first (pre-www) hypertext system for CERN in 1987 and collaborated with Tim Berners-Lee on the World Wide Web (jointly wi ...
collaborated on a joint request for funding, but the project was not formally adopted by CERN. In his personal notes from 1990 he listed "some of the many areas in which hypertext is used" and put an
encyclopedia
An encyclopedia (American English) or encyclopædia (British English) is a reference work or compendium providing summaries of knowledge either general or special to a particular field or discipline. Encyclopedias are divided into articles ...
first.
The first publicly available description of HTML was a document calle
"HTML Tags" first mentioned on the Internet by Tim Berners-Lee in late 1991.
It describes 18 elements comprising the initial, relatively simple design of HTML. Except for the hyperlink tag, these were strongly influenced by
SGMLguid
SGMLguid, also known as "CERN SGML", "Waterloo based SGML", and "Waterloo SGML", was an early SGML application developed and used at CERN between 1986 and 1990. It served as a model of the earliest HTML specifications.
History
In 1984, CERN start ...
, an in-house
Standard Generalized Markup Language
The Standard Generalized Markup Language (SGML; ISO 8879:1986) is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates":
* Declarative: Markup should des ...
(SGML)-based documentation format at CERN. Eleven of these elements still exist in HTML 4.
HTML is a
markup language
Markup language refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
that
web browser
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
s use to interpret and
compose
Composition or Compositions may refer to:
Arts and literature
*Composition (dance), practice and teaching of choreography
*Composition (language), in literature and rhetoric, producing a work in spoken tradition and written discourse, to include v ...
text, images, and other material into visual or audible web pages. Default characteristics for every item of HTML markup are defined in the browser, and these characteristics can be altered or enhanced by the web page designer's additional use of
CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
. Many of the text elements are found in the 1988 ISO technical report TR 9537 ''Techniques for using SGML'', which in turn covers the features of early text formatting languages such as that used by the
RUNOFF command developed in the early 1960s for the
CTSS (Compatible Time-Sharing System) operating system: these formatting commands were derived from the commands used by typesetters to manually format documents. However, the SGML concept of generalized markup is based on elements (nested annotated ranges with attributes) rather than merely print effects, with also the separation of structure and markup; HTML has been progressively moved in this direction with CSS.
Berners-Lee considered HTML to be an application of SGML. It was formally defined as such by the
Internet Engineering Task Force
The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
(IETF) with the mid-1993 publication of the first proposal for an HTML specification, the "Hypertext Markup Language (HTML)" Internet Draft by Berners-Lee and
Dan Connolly, which included an SGML
Document type definition
A document type definition (DTD) is a set of ''markup declarations'' that define a ''document type'' for an SGML-family markup language ( GML, SGML, XML, HTML).
A DTD defines the valid building blocks of an XML document. It defines the document ...
to define the grammar. The draft expired after six months, but was notable for its acknowledgment of the
NCSA Mosaic
NCSA Mosaic is a discontinued web browser, one of the first to be widely available. It was instrumental in popularizing the World Wide Web and the general Internet by integrating multimedia such as text and graphics. It was named for its support ...
browser's custom tag for embedding in-line images, reflecting the IETF's philosophy of basing standards on successful prototypes. Similarly,
Dave Raggett
Dave Raggett is an English computer specialist who has played a major role in implementing the World Wide Web since 1992.
He has been a W3C Fellow at the World Wide Web Consortium since 1995 and worked on many of the key web protocols, including ...
's competing Internet-Draft, "HTML+ (Hypertext Markup Format)", from late 1993, suggested standardizing already-implemented features like tables and fill-out forms.
After the HTML and HTML+ drafts expired in early 1994, the IETF created an HTML Working Group, which in 1995 completed "HTML 2.0", the first HTML specification intended to be treated as a standard against which future implementations should be based.
Further development under the auspices of the IETF was stalled by competing interests. the HTML specifications have been maintained, with input from commercial software vendors, by the
World Wide Web Consortium
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
(W3C).
However, in 2000, HTML also became an international standard (
ISO
ISO is the most common abbreviation for the International Organization for Standardization.
ISO or Iso may also refer to: Business and finance
* Iso (supermarket), a chain of Danish supermarkets incorporated into the SuperBest chain in 2007
* Iso ...
/
IEC
The International Electrotechnical Commission (IEC; in French: ''Commission électrotechnique internationale'') is an international standards organization that prepares and publishes international standards for all electrical, electronic and r ...
15445:2000). HTML 4.01 was published in late 1999, with further errata published through 2001. In 2004, development began on HTML5 in the
Web Hypertext Application Technology Working Group
The Web Hypertext Application Technology Working Group (WHATWG) is a community of people interested in evolving HTML and related technologies. The WHATWG was founded by individuals from Apple Inc., the Mozilla Foundation and Opera Software, lea ...
(WHATWG), which became a joint deliverable with the W3C in 2008, and was completed and standardized on 28 October 2014.
HTML versions timeline
HTML 2
:; November 24, 1995: HTML 2.0 was published as . Supplemental
RFC
RFC may refer to:
Computing
* Request for Comments, a memorandum on Internet standards
* Request for change, change management
* Remote Function Call, in SAP computer systems
* Rhye's and Fall of Civilization, a modification for Sid Meier's Civ ...
s added capabilities:
::* November 25, 1995: (form-based file upload)
::* May 1996: (tables)
::* August 1996: (client-side image maps)
::* January 1997: (
internationalization
In economics, internationalization or internationalisation is the process of increasing involvement of enterprises in international markets, although there is no agreed definition of internationalization. Internationalization is a crucial strateg ...
)
HTML 3
:; January 14, 1997: HTML 3.2 was published as a
W3C Recommendation
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
. It was the first version developed and standardized exclusively by the W3C, as the IETF had closed its HTML Working Group on September 12, 1996.
::Initially code-named "Wilbur",
HTML 3.2 dropped math formulas entirely, reconciled overlap among various proprietary extensions and adopted most of
Netscape
Netscape Communications Corporation (originally Mosaic Communications Corporation) was an American independent computer services company with headquarters in Mountain View, California and then Dulles, Virginia. Its Netscape web browser was onc ...
's visual markup tags. Netscape's
blink element
The blink element is a non-standard HTML element that indicates to a user agent (generally a web browser) that the page author intends the content of the element to blink (that is, alternate between being visible and invisible). The element was in ...
and
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
's
marquee element
The marquee tag is a non-standard HTML element which causes text to scroll up, down, left or right automatically. The tag was first introduced in early versions of Microsoft's Internet Explorer, and was compared to Netscape's blink element, as a p ...
were omitted due to a mutual agreement between the two companies.
A markup for mathematical formulas similar to that in HTML was not standardized until 14 months later in
MathML
Mathematical Markup Language (MathML) is a mathematical markup language, an application of XML for describing mathematical notations and capturing both its structure and content. It aims at integrating mathematical formulae into World Wide Web ...
.
HTML 4
:; December 18, 1997: HTML 4.0 was published as a W3C Recommendation. It offers three variations:
::* Strict, in which deprecated elements are forbidden
::* Transitional, in which deprecated elements are allowed
::* Frameset, in which mostly only
frame
A frame is often a structural system that supports other components of a physical construction and/or steel frame that limits the construction's extent.
Frame and FRAME may also refer to:
Physical objects
In building construction
*Framing (con ...
related elements are allowed.
::Initially code-named "Cougar",
HTML 4.0 adopted many browser-specific element types and attributes, but at the same time sought to phase out Netscape's visual markup features by marking them as
deprecated
In several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it has been superseded or is no longer considered efficient or safe, without completely removing ...
in favor of style sheets. HTML 4 is an SGML application conforming to ISO 8879 – SGML.
:; April 24, 1998: HTML 4.0 was reissued with minor edits without incrementing the version number.
:; December 24, 1999: HTML 4.01 was published as a W3C Recommendation. It offers the same three variations as HTML 4.0 and its las
erratawere published on May 12, 2001.
:; May 2000: ISO/IEC 15445:2000
("
ISO
ISO is the most common abbreviation for the International Organization for Standardization.
ISO or Iso may also refer to: Business and finance
* Iso (supermarket), a chain of Danish supermarkets incorporated into the SuperBest chain in 2007
* Iso ...
HTML", based on HTML 4.01 Strict) was published as an ISO/IEC international standard. In the ISO this standard falls in the domain of the
ISO/IEC JTC 1/SC 34
ISO/IEC JTC 1/SC 34, Document description and processing languages is a subcommittee of the ISO/IEC JTC 1 joint technical committee, which is a collaborative effort of both the International Organization for Standardization and the International El ...
(ISO/IEC Joint Technical Committee 1, Subcommittee 34 – Document description and processing languages).
:: After HTML 4.01, there was no new version of HTML for many years as the development of the parallel, XML-based language XHTML occupied the W3C's HTML Working Group through the early and mid-2000s.
HTML 5
:;October 28, 2014: HTML5 was published as a W3C Recommendation.
:;November 1, 2016: HTML 5.1 was published as a W3C Recommendation.
:;December 14, 2017: HTML 5.2 was published as a W3C Recommendation.
HTML draft version timeline
; October 1991: ''HTML Tags'',
an informal CERN document listing 18 HTML tags, was first mentioned in public.
; June 1992: First informal draft of the HTML DTD, with seven
[ See section "Revision History"] subsequent revisions (July 15, August 6, August 18, November 17, November 19, November 20, November 22)
; November 1992: HTML DTD 1.1 (the first with a version number, based on RCS revisions, which start with 1.1 rather than 1.0), an informal draft
; June 1993: Hypertext Markup Language was published by the
IETF
The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
IIIR Working Group as an Internet Draft (a rough proposal for a standard). It was replaced by a second version
one month later.
; November 1993
HTML+was published by the IETF as an Internet Draft and was a competing proposal to the Hypertext Markup Language draft. It expired in July 1994.
; November 1994: First draft (revision 00) of HTML 2.0 published by IETF itself (called as "HTML 2.0" from revision 02), that finally led to the publication of in November 1995.
; April 1995 (authored March 1995): HTML 3.0 was proposed as a standard to the IETF, but the proposal expired five months later (28 September 1995)
without further action. It included many of the capabilities that were in Raggett's HTML+ proposal, such as support for tables, text flow around figures, and the display of complex mathematical formulas.
:W3C began development of its own
Arena browser as a
test bed
A testbed (also spelled test bed) is a platform for conducting rigorous, transparent, and replicable testing of scientific theories, computational tools, and new technologies.
The term is used across many disciplines to describe experimental rese ...
for HTML 3 and Cascading Style Sheets, but HTML 3.0 did not succeed for several reasons. The draft was considered very large at 150 pages and the pace of browser development, as well as the number of interested parties, had outstripped the resources of the IETF.
Browser vendors, including Microsoft and Netscape at the time, chose to implement different subsets of HTML 3's draft features as well as to introduce their own extensions to it.
(see
Browser wars
A browser war is competition for dominance in the usage share of web browsers. The "first browser war," (1995-2001) pitted Microsoft's Internet Explorer against Netscape's Navigator. Browser wars continued with the decline of Internet Explorer ...
). These included extensions to control stylistic aspects of documents, contrary to the "belief
f the academic engineering communitythat such things as text color, background texture, font size, and font face were definitely outside the scope of a language when their only intent was to specify how a document would be organized."
Dave Raggett, who has been a W3C Fellow for many years, has commented for example: "To a certain extent, Microsoft built its business on the Web by extending HTML features."
; January 2008:
HTML5
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
was published as a
Working Draft by the W3C.
: Although its syntax closely resembles that of
SGML
The Standard Generalized Markup Language (SGML; ISO 8879:1986) is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates":
* Declarative: Markup should des ...
,
HTML5
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
has abandoned any attempt to be an SGML application and has explicitly defined its own "html" serialization, in addition to an alternative XML-based XHTML5 serialization.
; 2011 HTML5 – Last Call
: On 14 February 2011, the W3C extended the charter of its HTML Working Group with clear milestones for HTML5. In May 2011, the working group advanced HTML5 to "Last Call", an invitation to communities inside and outside W3C to confirm the technical soundness of the specification. The W3C developed a comprehensive test suite to achieve broad interoperability for the full specification by 2014, which was the target date for recommendation.
In January 2011, the WHATWG renamed its "HTML5" living standard to "HTML". The W3C nevertheless continues its project to release HTML5.
; 2012 HTML5 – Candidate Recommendation
: In July 2012, WHATWG and
W3C
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
decided on a degree of separation. W3C will continue the HTML5 specification work, focusing on a single definitive standard, which is considered a "snapshot" by WHATWG. The WHATWG organization will continue its work with HTML5 as a "Living Standard". The concept of a living standard is that it is never complete and is always being updated and improved. New features can be added but functionality will not be removed.
:In December 2012, W3C designated HTML5 as a Candidate Recommendation. The criterion for advancement to
W3C Recommendation
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
is "two 100% complete and fully interoperable implementations".
; 2014 HTML5 – Proposed Recommendation and Recommendation
:In September 2014, W3C moved HTML5 to Proposed Recommendation.
:On 28 October 2014, HTML5 was released as a stable W3C Recommendation, meaning the specification process is complete.
XHTML versions
XHTML is a separate language that began as a reformulation of HTML 4.01 using
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
1.0. It is no longer being developed as a separate standard.
* XHTML 1.0 was published as a W3C Recommendation on January 26, 2000, and was later revised and republished on August 1, 2002. It offers the same three variations as HTML 4.0 and 4.01, reformulated in XML, with minor restrictions.
* XHTML 1.1 was published as a W3C Recommendation on May 31, 2001. It is based on XHTML 1.0 Strict, but includes minor changes, can be customized, and is reformulated using modules in the W3C recommendation "Modularization of XHTML", which was published on April 10, 2001.
* XHTML 2.0 was a working draft, work on it was abandoned in 2009 in favor of work on
HTML5
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
and
XHTML5
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML L ...
. XHTML 2.0 was incompatible with XHTML 1.x and, therefore, would be more accurately characterized as an XHTML-inspired new language than an update to XHTML 1.x.
* An XHTML syntax, known as "XHTML5.1", is being defined alongside
HTML5
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
in the HTML5 draft.
Transition of HTML Publication to WHATWG
On 28 May 2019, the W3C announced that WHATWG would be the sole publisher of the HTML and DOM standards.
The W3C and WHATWG had been publishing competing standards since 2012. While the W3C standard was identical to the WHATWG in 2007 the standards have since progressively diverged due to different design decisions.
The WHATWG "Living Standard" had been the de facto web standard for some time.
Markup
HTML markup consists of several key components, including those called ''tags'' (and their ''attributes''), character-based ''data types'', ''character references'' and ''entity references''. HTML tags most commonly come in pairs like and , although some represent ''empty elements'' and so are unpaired, for example . The first tag in such a pair is the ''start tag'', and the second is the ''end tag'' (they are also called ''opening tags'' and ''closing tags'').
Another important component is the HTML ''
document type declaration #REDIRECT Document type declaration #REDIRECT Document type declaration
{{redirect category shell, {{R move{{R from other capitalisation{{R up ...
{{redirect category shell, {{R move{{R from other capitalisation{{R up ...
The text between and describes the web page, and the text between and is the visible page content. The markup text defines the browser page title shown on
titles and the tag defines a division of the page used for easy styling. Between and , a element can be used to define webpage metadata.
The Document Type Declaration is for HTML5. If a declaration is not included, various browsers will revert to "
" for rendering.
s. These are indicated in the document by HTML ''tags'', enclosed in angle brackets thus: .
In the simple, general case, the extent of an element is indicated by a pair of tags: a "start tag" and "end tag" . The text content of the element, if any, is placed between these tags.
Tags may also enclose further tag markup between the start and end, including a mixture of tags and text. This indicates further (nested) elements, as children of the parent element.
The start tag may also include the element's ''attributes'' within the tag. These indicate other information, such as identifiers for sections within the document, identifiers used to bind style information to the presentation of the document, and for some tags such as the used to embed images, the reference to the image resource in the format like this:
Some elements, such as the
, or do not permit ''any'' embedded content, either text or further tags. These require only a single empty tag (akin to a start tag) and do not use an end tag.
Many tags, particularly the closing end tag for the very commonly used paragraph element , are optional. An HTML browser or other agent can infer the closure for the end of an element from the context and the structural rules defined by the HTML standard. These rules are complex and not widely understood by most HTML coders.
The general form of an HTML element is therefore: . Some HTML elements are defined as ''empty elements'' and take the form . Empty elements may enclose no content, for instance, the tag or the inline tag.
The name of an HTML element is the name used in the tags.
Note that the end tag's name is preceded by a slash character,
, and that in empty elements the end tag is neither required nor allowed.
If attributes are not mentioned, default values are used in each case.
Header of the HTML document: . The title is included in the head, for example:
=
HTML headings are defined with the to tags with H1 being the highest (or most important) level and H6 the least:
Line breaks:
. The difference between and is that
without altering the semantic structure of the page, whereas sections the page into
s. The element is an ''empty element'' in that, although it may have attributes, it can take no content and it may not have an end tag.
This is a link in HTML. To create a link the tag is used. The
address of the link.
Comments can help in the understanding of the markup and do not display in the webpage.
There are several types of markup elements used in HTML:
;Structural markup indicates the purpose of text: For example, establishes "Golf" as a second-level
. Structural markup does not denote any specific rendering, but most web browsers have default styles for element formatting. Content may be further styled using
(CSS).
; Presentational markup indicates the appearance of the text, regardless of its purpose: For example, indicates that visual output devices should render "boldface" in bold text, but gives a little indication what devices that are unable to do this (such as aural devices that read the text aloud) should do. In the case of both and , there are other elements that may have equivalent visual renderings but that are more semantic in nature, such as and respectively. It is easier to see how an aural user agent should interpret the latter two elements. However, they are not equivalent to their presentational counterparts: it would be undesirable for a screen reader to emphasize the name of a book, for instance, but on a screen, such a name would be italicized. Most presentational markup elements have become
for styling.
;Hypertext markup makes parts of a document into links to other documents: An anchor element creates a
. For example, the HTML markup , will render the word "